@use 'variables';
@use 'toast';
@use 'typography';

// Reset CSS
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(249, 251, 254);
}

// Scrollbar style
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;

  &:hover {
    background: #a8a8a8;
  }
}

// Element Plus override - 现代化样式
.el-menu {
  border-right: none !important;
}

.el-menu-item {
  &.is-active {
    background-color: #ecf5ff !important;
  }
}

// 按钮样式增强
.el-button {
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;

  &.el-button--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
    }

    &:active {
      transform: translateY(0);
    }
  }
}

// 输入框样式增强
.el-input__wrapper {
  border-radius: 10px;
  transition: all 0.3s ease;

  &:hover {
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3);
  }

  &.is-focus {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.4);
  }
}

// 卡片样式增强
.el-card {
  border-radius: 16px;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;

  &:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }
}

// 分页样式增强
.el-pagination {
  .el-pager li {
    border-radius: 8px;
    transition: all 0.3s ease;

    &.is-active {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }

    &:hover {
      transform: scale(1.1);
    }
  }

  .btn-prev,
  .btn-next {
    border-radius: 8px;
    transition: all 0.3s ease;

    &:hover {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
    }
  }
}

// Common utility classes
.cursor-pointer {
  cursor: pointer;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// Transitions
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

// Layout
.app-wrapper {
  .main-container {
    background-color: #f0f2f5;

    .app-main {
      padding: 20px;

      .el-card {
        margin-bottom: 20px;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }
}
